package com.huifan.demo.util;

import java.io.IOException;
import java.util.Properties;

/**
 * @author: liuchenhui
 * @create: 2019-05-31 16:42
 **/
public class PropertiesUtil {

    public static Properties load(String fileName) {
        if (fileName == null || fileName.trim() == "") {
            return null;
        }
        try {
            Properties properties = new Properties();
            properties.load(PropertiesUtil.class.getClassLoader().getResourceAsStream(fileName));
            return properties;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}
